<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>后台管理面板</title>
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  <include file="common/top" />
</head>
<body class="hold-transition skin-blue sidebar-mini">	
<div class="wrapper">
    <div class="content-wrapper" style="margin-left: 0 !important;">
        <!--页眉-->
        <section class="content-header">
            <h1>{{$lists?'修改':'添加'}}轮播图</h1>
        </section>
        <!--内容开始-->
        <section class="content">
            <div class="search">
                <form class="form-inline" action="">
                    <input class="btn btn-flat btn-primary m_10_l_0" onclick="location.href='{{:url('index')}}'" type="button" value="显示全部">
                    <a class="btn btn-flat btn-success m_10 f_r" onclick="javascript :history.back(-1)"><i class="fa fa-undo m-r-10"></i>返 回</a>
            	</form> 
            </div>
            <!--数据表开始-->
            <if condition="$lists">
            <form method="post" action="{{:url('editsave')}}">
                <input type="hidden" name="id" value="{{$lists.id}}"/>
            <else />
            <form method="post" action="{{:url('addsave')}}">
            </if>
            <!---->
            <div class="row">
                <div class="col-sm-12 col-xs-12">
                	<div class="box box-body">
                        <!---->
                        <div class="row dd_input_group">
                            <div class="form-group">
                                <label class="col-sm-1 col-xs-4 control-label dd_input_l">分类</label>
                                <div class="col-sm-4 col-xs-8">
                                    <select name="cid" class="form-control">
                                        <option value="">请选择轮播图分类</option>
                                        <volist name="slideType" id="vo">
                                        <if condition="$lists">
                                            <option <eq name="$lists[cid]" value="$vo.id">selected</eq> value="{{$vo.id}}">{{$vo.title}}</option>
                                        <else />
                                            <option value="{{$vo.id}}">{{$vo.title}}</option>
                                        </if>
                                        </volist>
                                    </select>
                                </div>
                                <div class="col-sm-4 dd_ts">*</div>
                            </div>
                        </div>
                        <!---->
                        <div class="row dd_input_group">
                            <div class="form-group">
                                <label class="col-sm-1 col-xs-4 control-label dd_input_l">标题</label>
                                <div class="col-sm-4 col-xs-8">
                                    <input type="text" name="title" class="form-control" placeholder="请输入轮播图标题" value="{{$lists.title}}">
                                </div>
                                <div class="col-sm-4 dd_ts">*</div>
                            </div>
                        </div>
                        <!---->
                        <div class="row dd_input_group">
                            <div class="form-group">
                                <label class="col-sm-1 col-xs-4 control-label dd_input_l">图片</label>
                                <div class="col-sm-4 col-xs-8">
                                    <input type="text" name="faceimg" class="form-control" placeholder="请点击按钮上传或手动输入地址" value="{{$lists.faceimg}}">
                                </div>
                                <div class="col-sm-4 dd_ts">
                                    <!--上传图片-->
                                    <!--用来存放item-->
                                    <div id="fileList_image" class="uploader-list"></div>
                                    <div id="filePicker_image"><i class="fa fa-upload m-r-10"></i>选择图片</div>
                                    <img class="image_preview" src="{{$lists.faceimg?$lists.faceimg:'/static/admin/images/nopic.png'}}" id="image_preview">
				                  	<!--上传图片-->
                                </div>
                            </div>
                        </div>
                        <!---->
                        <div class="row dd_input_group">
                            <div class="form-group">
                                <label class="col-sm-1 col-xs-4 control-label dd_input_l">URL</label>
                                <div class="col-sm-4 col-xs-8">
                                    <input type="text" name="url" class="form-control" placeholder="请输入url" value="{{$lists.url}}">
                                </div>
                                <div class="col-sm-4 dd_ts"></div>
                            </div>
                        </div>
                        <!---->
                         <div class="row dd_input_group">
		                	<div class="form-group">
			                  <label class="col-sm-1 col-xs-4 control-label dd_input_l">状态</label>
			                  <div class="col-sm-4 col-xs-8">
                              <div class="dd_radio_lable_left">
                              <if condition="$lists">
			                    <label class="dd_radio_lable">
                                  <input type="radio" name="status" value="1" class="dd_radio" <eq name="lists.status" value="1">checked</eq> ><span>显示</span>
                                </label>
                                <label class="dd_radio_lable">
                                  <input type="radio" name="status" value="0" class="dd_radio" <eq name="lists.status" value="0">checked</eq> ><span>隐藏</span>
                                </label>
                                 <else />
                                 <label class="dd_radio_lable">
                                  <input type="radio" name="status" value="1" class="dd_radio" checked><span>显示</span>
                                </label>
                                <label class="dd_radio_lable">
                                  <input type="radio" name="status" value="0" class="dd_radio" ><span>隐藏</span>
                                </label>
                                 </if>
                                 </div>
			                  </div>
                              <div class="col-sm-4 dd_ts"></div>
			                </div>
		                </div>
                        <!---->
                        <div class="row dd_input_group">
                            <div class="form-group">
                                <label class="col-sm-1 col-xs-4 control-label"></label>
                                <div class="col-sm-4 col-xs-8">
                                    <button type="submit" class="btn btn-flat btn-primary ">提 交</button>
                                    <button type="button" class="btn btn-flat btn-default" onclick="javascript :history.back(-1)">返 回</button>
                                </div>
                            </div>
                        </div>
                 </div>
                  <!-- /.box -->
                </div>
            </div>
            </form>
            <!--数据表结束-->
        </section>
        <!-- right col -->
      </div>
      <!-- /.row (main row) -->

    </section>
        <!--内容结束-->
    </div>
</div>
  <include file="common/bottom" />
<!--引入JS-->
<script type="text/javascript" src="/static/admin/webuploader-0.1.5/webuploader.js"></script>
  <include file="common/upload" />
<script type="text/javascript">
	webupload('fileList_image','filePicker_image','image_preview','faceimg');
</script>
</body>
</html>    